<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../vue/vue.js"></script>
</head>
<body>

<div id="app">
    {{msg | toDou("12","5")}}
</div>

<script>
    Vue.filter('toDou',function (n,a,b) {
        alert(a)
        alert(b)
        return n<10?'0'+n:''+n;
    })

    new Vue({
        data:{
            msg:9
        }

    }).$mount('#app')
</script>

</body>
</html>